<template>
<div id="haoping">


  <div class="top-rated1">
   <p class="title">近期最受期待</p>
<div class="content11">
  
    <WaitHotMov
      v-for="item in praise"
          :key="item.id"
          :item="item"
    />
  
</div>
  </div>

  
    <WaitList
     v-for="item in movielist"
          :key="item.id"
          :item="item"
    />
  </div>
  
</template>

<script>
import WaitHotMov from "@/components/WaitHotMov.vue";
import WaitList from "@/components/WaitList.vue";
export default {
components:{
  WaitHotMov,
  WaitList,
},
data:function(){
  return{
praise:[],
movielist:[],
city:[],
  };
},
methods: {
      getHistory() {
      //获取城市记录
      let re = localStorage.getItem("selecthistory");
      this.city = JSON.parse(re)[0];
    },
},

created:function(){
  this.getHistory();
  console.log(this.city.id);
 this.axios
      .get("https://apis.netstart.cn/maoyan/index/mostExpected?ci=" +
          this.city.id +
          "&limit=10&offset=0")
      .then((res) => {
        console.log(res, this.city.id);
        this.praise = res.data.coming;
        console.log(this.praise,5555);
      });
// 待映
this.axios
      .get("https://apis.netstart.cn/maoyan/index/comingList?ci=" +
          this.city.id +
          "&limit=20")
      .then((res) => {
        console.log(res, this);
        this.movielist = res.data.coming;
      });


},


};
</script>

<style lang="less">
#haoping{


.top-rated1{
  padding: 12px 15px;
    background-color: #fff;
    margin-bottom: 10px;
     position: relative;
top:155px; 
    // .content{
    //   // width: 900px;
    // }
  .title{
    font-size: 14px;
    color: #333;
    margin: 0 0 12px ;
  }
  .content11{
  
    overflow: scroll;
    white-space: nowrap;
      
  }
   div::-webkit-scrollbar {
      display: none;
    }
}
}
</style>